//
//  ImageModelCell.m
//  lianxi_3
//
//  Created by lanou3g on 16/4/18.
//  Copyright © 2016年 张静. All rights reserved.
//

#import "ImageModelCell.h"

@interface ImageModelCell ()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *descLabel;
@property (weak, nonatomic) IBOutlet UIImageView *titleImageView;
@property (weak, nonatomic) IBOutlet UILabel *channelLabel;
@property (weak, nonatomic) IBOutlet UILabel *dataLabel;
@property (weak, nonatomic) IBOutlet UILabel *sourceLabel;

@end
@implementation ImageModelCell
- (void)setModel:(ImageModel *)model {
    if (_model != model) {
        _model = model;
    }
}
- (void)layoutSubviews {
    self.titleLabel.text = self.model.title;
    self.descLabel.text = self.model.desc;
    self.channelLabel.text = self.model.desc;
    self.dataLabel.text = self.model.pubDate;
    self.sourceLabel.text = self.model.source;
    self.titleImageView.image = [UIImage imageNamed:self.model.imageurls.firstObject[@"url"]];
}
+ (CGFloat)height {
    return 220;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
